// axios 发送ajax请求
import request from '@/utils/request'

export const aliPayPayService = (productId)=>{
  return request({
      url: '/api/ali-pay/trade/page/pay/' + productId,
      method: 'post'
    })
}

export const aliPayQueryService = (orderNo)=>{
  return request({
      url: '/api/ali-pay/trade/query/' + orderNo,
      method: 'get'
    })
}

export const aliPayCancleService = (orderNo)=>{
  return request({
      url: '/api/ali-pay/trade/close/' + orderNo,
      method: 'post'
    })
}

export const aliPayRefundsService = (orderNo, reason)=>{
  return request({
      url: '/api/ali-pay/trade/refund/' + orderNo + '/' + reason,
      method: 'post'
    })
}
